Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #10554: Additional version bound checks #10749

Open
wants to merge 1 commit into
base: 3.14
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 14, 2025

Fixes #9806. Checks that lower bounds are inclusive, upper bounds are exclusive and don't have trailing zeros.


This is an automatic backport of pull request #10554 done by [Mergify](https://mergify.com).

- Check for LEQ upper bounds
- Check for GT lower bounds
- Check for trailing zero upper bounds
- Add missing gtLowerBound to checks
- Handle ^>= versions with its IntersectVersionRangesF
- Set baseline for cabal init generated bounds
- Use recursive functions for checking bounds
- Handle union version ranges
- Update test expectations with --accept in other tests
- Use inclusive lower bound for issue-8646.cabal
- Satisfy the parsimonious test for messages
- Allow exceptions to 25 char limit explain ids
- Rename Is* to Has* to match previous predicates
- Move predicates to VersionRange module
- Add changelog
- Remove unit-test guards that aren't needed
- Shorten check IDs
- Add warnings to cabal check section of user guide
- Terminate bulleted list with full stop
- Remove links to pvp.haskell.org
- Note version constraint guidelines and mistakes
- Add listSep
- Reuse queryVersionRange
- Bundle pattern synonyms with VersionRangeF
- Add doctest docs for version range predicates
- Used named chunk for predicate examples
- Add predicate subsections for types of bounds
- Change lte- to le- prefix
- Satisfy fourmolu
- Flip sense of LE and GT haddocks
- Drop Has prefix on patterns, use LE not LEQ
- avoid name clash with has*Bound (VersionRange -> Bool) predicates
- use TZ not TrailingZero, a two-letter prefix like the other two
- Test expectations with shorter check messages
- Remove unused LANGUAGE pragmas
- Satisfy hlint
- Promote to haddocks, move NOTE about dashes
- Rerun --accept test to generate VersionBound/cabal.out
- rewrite was not triggered by only a trailing whitespace differerence
- Fixup version range of ImpossibleVersionRangeLib
- Fixup version range of NonConfCheck/PackageVersionsInternal
- Fixup version range of NonConfCheck/PackageVersionsInternalSimple
- Fixup version range of NonConfCheck/PackageVersionsLibInt
- Fixup version range of NonConfCheck/PackageVersionsStraddle
- Fixup version range of NonConfCheck/SetupBounds
- Move to DepVersionRange/VersionConstraintOperators
- Move to DepVersionRange/UnboundedInternalDep
- Move to DepVersionRange/InternalLibDep
- Move to DepVersionRange/BaseDep
- Move to DepVersionRange/CustomSetupBaseDep

(cherry picked from commit d46f325)

# Conflicts:
#	Cabal/src/Distribution/PackageDescription/Check/Common.hs
#	Cabal/src/Distribution/PackageDescription/Check/Warning.hs
@mergify mergify bot added the conflicts label Jan 14, 2025
Copy link
Contributor Author

mergify bot commented Jan 14, 2025

Cherry-pick of d46f325 has failed:

On branch mergify/bp/3.14/pr-10554
Your branch is up to date with 'origin/3.14'.

You are currently cherry-picking commit d46f325c5.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cabal-syntax/src/Distribution/Types/VersionRange.hs
	modified:   Cabal-syntax/src/Distribution/Types/VersionRange/Internal.hs
	modified:   Cabal-syntax/src/Distribution/Version.hs
	modified:   Cabal-tests/tests/ParserTests/regressions/issue-8646.cabal
	modified:   Cabal/src/Distribution/PackageDescription/Check.hs
	modified:   Cabal/src/Distribution/PackageDescription/Check/Target.hs
	modified:   cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/ImpossibleVersionRangeLib/cabal.out
	modified:   cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/ImpossibleVersionRangeLib/pkg.cabal
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersions/cabal.out -> cabal-testsuite/PackageTests/Check/DepVersionRange/BaseDep/cabal.out
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersions/cabal.test.hs -> cabal-testsuite/PackageTests/Check/DepVersionRange/BaseDep/cabal.test.hs
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersions/pkg.cabal -> cabal-testsuite/PackageTests/Check/DepVersionRange/BaseDep/pkg.cabal
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/SetupBounds/Setup.hs -> cabal-testsuite/PackageTests/Check/DepVersionRange/CustomSetupBaseDep/Setup.hs
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/SetupBounds/cabal.out -> cabal-testsuite/PackageTests/Check/DepVersionRange/CustomSetupBaseDep/cabal.out
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/SetupBounds/cabal.test.hs -> cabal-testsuite/PackageTests/Check/DepVersionRange/CustomSetupBaseDep/cabal.test.hs
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/SetupBounds/pkg.cabal -> cabal-testsuite/PackageTests/Check/DepVersionRange/CustomSetupBaseDep/pkg.cabal
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsLibInt/cabal.out -> cabal-testsuite/PackageTests/Check/DepVersionRange/InternalLibDep/cabal.out
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsLibInt/cabal.test.hs -> cabal-testsuite/PackageTests/Check/DepVersionRange/InternalLibDep/cabal.test.hs
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsLibInt/pkg.cabal -> cabal-testsuite/PackageTests/Check/DepVersionRange/InternalLibDep/pkg.cabal
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsInternalSimple/cabal.out -> cabal-testsuite/PackageTests/Check/DepVersionRange/UnboundedInternalDep/cabal.out
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsInternalSimple/cabal.test.hs -> cabal-testsuite/PackageTests/Check/DepVersionRange/UnboundedInternalDep/cabal.test.hs
	renamed:    cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsInternalSimple/pkg.cabal -> cabal-testsuite/PackageTests/Check/DepVersionRange/UnboundedInternalDep/pkg.cabal
	new file:   cabal-testsuite/PackageTests/Check/DepVersionRange/VersionConstraintOperators/cabal.out
	new file:   cabal-testsuite/PackageTests/Check/DepVersionRange/VersionConstraintOperators/cabal.test.hs
	new file:   cabal-testsuite/PackageTests/Check/DepVersionRange/VersionConstraintOperators/pkg.cabal
	modified:   cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsInternal/pkg.cabal
	modified:   cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsStraddle/pkg.cabal
	new file:   changelog.d/pr-10554
	modified:   doc/cabal-commands.rst

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cabal/src/Distribution/PackageDescription/Check/Common.hs
	both modified:   Cabal/src/Distribution/PackageDescription/Check/Warning.hs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot mentioned this pull request Jan 14, 2025
6 tasks
@mergify mergify bot added the backport label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant